Skip to content

Conversation

SyntheticBird45
Copy link
Member

What

Part of ongoing Tor support development for Cuprate

Follows: #446, #481 and #509

Changelog

This is the first version of the Tor section for the User Book and Architecture Book.

The User Book Tor section treats the following topics:

  • Arti vs Tor
  • How to connect to the network
  • Where is the relevant user configuration
  • How to setup incoming connections
  • How to anonymize clearnet traffic through Tor

The Architecture Book Tor section treats the following topics:

  • Onion addressing
  • Zone definition
  • Transport methods
  • Cuprated components (Configuration, Dandelion and P2P Initialization)

@github-actions github-actions bot added A-docs Area: Related to documentation. A-books Area: Related to Cuprate's books. A-binaries Area: Related to binaries. A-book-architecture Area: Related to the Architecture book. A-book-user Area: Related to the User book. labels Sep 6, 2025
@SyntheticBird45 SyntheticBird45 marked this pull request as ready for review September 6, 2025 12:15
Copy link
Contributor

@hinto-janai hinto-janai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I am unsure of continuing the architecture book in the current form: #476.

Comment on lines +29 to +39
## Configuration for cuprated's Tor component
[tor]
## Enable Tor network by specifying how to connect to it.
##
## When "Daemon" is set, the Tor daemon address to use can be
## specified in `tor.daemon.address`.
##
## Type | String
## Valid values | "Arti", "Daemon", "Off"
## Examples | "Arti"
mode = "Off" # <----- Here
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think just the key + field is good.

Suggested change
## Configuration for cuprated's Tor component
[tor]
## Enable Tor network by specifying how to connect to it.
##
## When "Daemon" is set, the Tor daemon address to use can be
## specified in `tor.daemon.address`.
##
## Type | String
## Valid values | "Arti", "Daemon", "Off"
## Examples | "Arti"
mode = "Off" # <----- Here
[tor]
mode = "Off" # <----- Here

Comment on lines +68 to +77
[p2p.tor_net]
#...
## Enable Tor inbound onion server.
##
## [...]
##
## Type | boolean
## Valid values | false, true
## Examples | false
inbound_onion = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[p2p.tor_net]
#...
## Enable Tor inbound onion server.
##
## [...]
##
## Type | boolean
## Valid values | false, true
## Examples | false
inbound_onion = true
[p2p.tor_net]
inbound_onion = true

Comment on lines +80 to +88
### Arti

If you are using Arti, that's it. `cuprated` will auto-generate a hidden service at startup.

A few notes:
- The onion address is generated randomly.
- The onion address is persistent across reboots.
- The onion address cannot be changed without deleting the Arti state directory.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do users find the generated arti onion address?

In the `[tor.daemon]` section,
The `listening_addr` field must be set to the IP and port on which `cuprated` will listen for connections coming from your Tor daemon. This is the destination of your hidden service.
```
HiddenServicePort 18083 [127.0.0.1:18090] <-- This part
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO invalid syntax is confusing, how is this?

Suggested change
HiddenServicePort 18083 [127.0.0.1:18090] <-- This part
# This part
# v
HiddenServicePort 18083 127.0.0.1:18090

Comment on lines +112 to +114
HiddenServicePort [18083] 127.0.0.1:18090
^
The virtual port
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
HiddenServicePort [18083] 127.0.0.1:18090
^
The virtual port
HiddenServicePort 18083 127.0.0.1:18090
# ^
# The virtual port


If everything has been set correctly, your node will start to broadcast its onion address to other Tor peers in order to be reached.

## Anonymizing cuprate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cuprated or Cuprate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-binaries Area: Related to binaries. A-book-architecture Area: Related to the Architecture book. A-book-user Area: Related to the User book. A-books Area: Related to Cuprate's books. A-docs Area: Related to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants